<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subject_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-subject_id" data-rule="required" data-field="subject_name" data-source="kaoshi/subject/index" class="form-control selectpage" name="row[subject_id]" type="text" value="{$row.subject_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Exam_name')}:</label>
        <div class="col-xs-12 col-sm-8">
           <input id="c-exam_id" data-rule="required" data-field="exam_name" data-source="kaoshi/examination/exams/index" class="form-control selectpage" name="row[exam_id]" type="text" value="{$row.exam_id|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('user_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_ids" data-rule="required" data-field="username" data-source="user/user/index" class="form-control selectpage" name="row[user_ids]" type="text" value="{$row.user_ids|htmlentities}" data-multiple="true" >
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">省市县:</label>
        <div class="col-xs-12 col-sm-8" id="c-region" data-toggle="cxselect" data-selects="province,city,area">
            <select class="province form-control" name="row[province]"  data-url="ajax/area" data-value="{$row.province}"></select>
            <select class="city form-control" name="row[city]" data-url="ajax/area" data-value="{$row.city}"></select>
            <select class="city form-control" name="row[area]" data-url="ajax/area" data-value="{$row.area}"></select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Plan_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-plan_name" data-rule="required" class="form-control" name="row[plan_name]" type="text" value="{$row.plan_name|htmlentities}">
        </div>
    </div>

    <div class="form-group time0 {$row.type==0?'':'hide'}">
        <label class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-times" data-rule="integer" min='0' step="1"  class="form-control" name="row[times]" type="number" value="{$row.times|default='0'}">
        </div>
    </div>

    <div class="form-group time1 ">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hours')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hours" data-rule="required"  min='1' step="1" class="form-control" name="row[hours]" type="number" value="{$row.hours|default='60'}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Starttime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-starttime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[starttime]" type="text" value="{:$row.starttime?datetime($row.starttime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Endtime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-endtime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[endtime]" type="text" value="{:$row.endtime?datetime($row.endtime):''}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
